package com.lib.framework.network

import android.content.Context
import com.lib.framework.base.BaseConfigList
import retrofit2.Retrofit

/**
 * Copyright (C), 2019-2020
 * FileName: OkHttpClientConfig
 * Author: Kevin
 * Date: 2020-01-06 15:19
 * Description: Retrofit 的配置类，配置的接口是 (context: Context, builder: Retrofit.Builder) -> Unit
 * History:
 * <author> <time> <version> <desc>
 * 作者姓名 修改时间 版本号 描述
 */
class RetrofitConfig(val context: Context) :
    BaseConfigList<(context: Context, builder: Retrofit.Builder) -> Unit>() {

    /**
     * 配置 Retrofit 的 builder
     */
    fun configBuilder(builder: Retrofit.Builder) {
        for (value in mConfigList) {
            value(context, builder)
        }
    }

}